Skip to content

GROOVY-11642: include annotations and modifiers in inner class offset#2211

Merged
eric-milles merged 1 commit into
masterfrom
GROOVY-11642
May 5, 2025
Merged

GROOVY-11642: include annotations and modifiers in inner class offset#2211
eric-milles merged 1 commit into
masterfrom
GROOVY-11642

Conversation

@eric-milles
Copy link
Copy Markdown
Member

inner class offset like outer class offset

@apache apache deleted a comment from codecov-commenter May 4, 2025
@eric-milles
Copy link
Copy Markdown
Member Author

I checked field, method and compact constructor. The first two already include annotations and modifiers in their source offset and the compact constructor is mapped to a closure in the TupleConstructor pre attribute. So this is ready to merge.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.9672%. Comparing base (71ca3e0) to head (468f1ea).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2211        +/-   ##
==================================================
+ Coverage     68.9576%   68.9672%   +0.0096%     
- Complexity      29591      29598         +7     
==================================================
  Files            1423       1423                
  Lines          114102     114102                
  Branches        19793      19793                
==================================================
+ Hits            78682      78693        +11     
+ Misses          28800      28793         -7     
+ Partials         6620       6616         -4     
Files with missing lines Coverage Δ
...va/org/apache/groovy/parser/antlr4/AstBuilder.java 86.5333% <100.0000%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@daniellansun daniellansun requested a review from Copilot May 4, 2025 17:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the AST building process to include annotations and modifiers in inner class offsets, aligning them with the outer class offset logic.

  • Replaces the direct call to visitClassDeclaration with a call to configureAST to further process AST nodes for inner classes.
Files not reviewed (3)
  • src/test-resources/bugs/BUG-GROOVY-8426.groovy: Language not supported
  • src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy: Language not supported
  • src/test/groovy/org/codehaus/groovy/antlr/AstBuilderTest.groovy: Language not supported

Comment thread src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@daniellansun
Copy link
Copy Markdown
Contributor

LGTM

@eric-milles eric-milles merged commit e17e3be into master May 5, 2025
41 checks passed
@eric-milles eric-milles deleted the GROOVY-11642 branch May 5, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants